package com.magictower.primary.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.magictower.primary.R;

/**
 * @author kejunzhan
 * @since 2017/12/13
 */

public class ClickView extends RelativeLayout {

    private TextView tvTitle;
    private TextView tvDesc;

    public ClickView(Context context) {
        super(context);
        initView();
    }

    public ClickView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView();
    }

    public ClickView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView();
    }

    private void initView(){
        View.inflate(getContext(), R.layout.view_click, this);
        tvTitle = (TextView) findViewById(R.id.tv_title);
        tvDesc = (TextView) findViewById(R.id.tv_desc);
    }

    public void setDesc(String desc) {
        tvDesc.setText(desc);
    }

    public void setTitle(String title) {
        tvTitle.setText(title);
    }
}
